package com.demo.controller;

import com.demo.model.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;

import javax.annotation.Resource;

@Controller
public class StudentController {
    @Autowired
//    @Qualifier("student1")
    public Student student;

    public Student getStudent(){
        System.out.println("修改前:"+student);
        Student stu=student;
        stu.setName("赵武");
        return stu;
    }
}
